﻿<%@ Page Title="" Language="C#" MasterPageFile="~/Management.master" AutoEventWireup="true" CodeFile="agent-tele-summary.aspx.cs" Inherits="telereport_agent_tele_summary" %>

<asp:Content ID="Content1" ContentPlaceHolderID="ContentPlaceHolder1" runat="Server">
    <div class="contents">
        <table style="width:100%;" cellpadding="3" cellspacing="0" border="0">
            <tr>
                <td>
                    <h1>
                        GG Campaign Summary</h1>
                </td>
            </tr>
            <tr id="trSearch" runat="server">
                <td>
                    <b>Report Type</b> :
                    <asp:DropDownList ID="ddlReportType" runat="server" AutoPostBack="true" OnSelectedIndexChanged="ddlReportType_SelectedIndexChanged">
                        <asp:ListItem Value="0">Monthly</asp:ListItem>
                        <asp:ListItem Value="1" Selected="True">Daily</asp:ListItem>
                        <asp:ListItem Value="2">Customize</asp:ListItem>
                    </asp:DropDownList>
                    &nbsp; <b>
                        <asp:Label ID="lblFromDate" runat="server"></asp:Label></b>
                    <asp:DropDownList ID="ddlDay1" runat="server" ToolTip="Choose Day">
                        <asp:ListItem Value="01">01</asp:ListItem>
                        <asp:ListItem Value="02">02</asp:ListItem>
                        <asp:ListItem Value="03">03</asp:ListItem>
                        <asp:ListItem Value="04">04</asp:ListItem>
                        <asp:ListItem Value="05">05</asp:ListItem>
                        <asp:ListItem Value="06">06</asp:ListItem>
                        <asp:ListItem Value="07">07</asp:ListItem>
                        <asp:ListItem Value="08">08</asp:ListItem>
                        <asp:ListItem Value="09">09</asp:ListItem>
                        <asp:ListItem Value="10">10</asp:ListItem>
                        <asp:ListItem Value="11">11</asp:ListItem>
                        <asp:ListItem Value="12">12</asp:ListItem>
                        <asp:ListItem Value="13">13</asp:ListItem>
                        <asp:ListItem Value="14">14</asp:ListItem>
                        <asp:ListItem Value="15">15</asp:ListItem>
                        <asp:ListItem Value="16">16</asp:ListItem>
                        <asp:ListItem Value="17">17</asp:ListItem>
                        <asp:ListItem Value="18">18</asp:ListItem>
                        <asp:ListItem Value="19">19</asp:ListItem>
                        <asp:ListItem Value="20">20</asp:ListItem>
                        <asp:ListItem Value="21">21</asp:ListItem>
                        <asp:ListItem Value="22">22</asp:ListItem>
                        <asp:ListItem Value="23">23</asp:ListItem>
                        <asp:ListItem Value="24">24</asp:ListItem>
                        <asp:ListItem Value="25">25</asp:ListItem>
                        <asp:ListItem Value="26">26</asp:ListItem>
                        <asp:ListItem Value="27">27</asp:ListItem>
                        <asp:ListItem Value="28">28</asp:ListItem>
                        <asp:ListItem Value="29">29</asp:ListItem>
                        <asp:ListItem Value="30">30</asp:ListItem>
                        <asp:ListItem Value="31">31</asp:ListItem>
                    </asp:DropDownList>
                    <asp:DropDownList ID="ddlMonth1" runat="server">
                        <asp:ListItem Value="01">Jan</asp:ListItem>
                        <asp:ListItem Value="02">Feb</asp:ListItem>
                        <asp:ListItem Value="03">Mar</asp:ListItem>
                        <asp:ListItem Value="04">Apr</asp:ListItem>
                        <asp:ListItem Value="05">May</asp:ListItem>
                        <asp:ListItem Value="06">Jun</asp:ListItem>
                        <asp:ListItem Value="07">Jul</asp:ListItem>
                        <asp:ListItem Value="08">Aug</asp:ListItem>
                        <asp:ListItem Value="09">Sep</asp:ListItem>
                        <asp:ListItem Value="10">Oct</asp:ListItem>
                        <asp:ListItem Value="11">Nov</asp:ListItem>
                        <asp:ListItem Value="12">Dec</asp:ListItem>
                    </asp:DropDownList>
                    <asp:DropDownList ID="ddlYear1" runat="server">
                        <asp:ListItem Value="2010">2010</asp:ListItem>
                        <asp:ListItem Value="2011">2011</asp:ListItem>
                        <asp:ListItem Value="2012">2012</asp:ListItem>
                        <asp:ListItem Value="2013">2013</asp:ListItem>
                    </asp:DropDownList>
                    <b>
                        <asp:Label ID="lblToDate" runat="server"></asp:Label></b>
                    <asp:DropDownList ID="ddlDay2" runat="server" ToolTip="Choose Day">
                        <asp:ListItem Value="01">01</asp:ListItem>
                        <asp:ListItem Value="02">02</asp:ListItem>
                        <asp:ListItem Value="03">03</asp:ListItem>
                        <asp:ListItem Value="04">04</asp:ListItem>
                        <asp:ListItem Value="05">05</asp:ListItem>
                        <asp:ListItem Value="06">06</asp:ListItem>
                        <asp:ListItem Value="07">07</asp:ListItem>
                        <asp:ListItem Value="08">08</asp:ListItem>
                        <asp:ListItem Value="09">09</asp:ListItem>
                        <asp:ListItem Value="10">10</asp:ListItem>
                        <asp:ListItem Value="11">11</asp:ListItem>
                        <asp:ListItem Value="12">12</asp:ListItem>
                        <asp:ListItem Value="13">13</asp:ListItem>
                        <asp:ListItem Value="14">14</asp:ListItem>
                        <asp:ListItem Value="15">15</asp:ListItem>
                        <asp:ListItem Value="16">16</asp:ListItem>
                        <asp:ListItem Value="17">17</asp:ListItem>
                        <asp:ListItem Value="18">18</asp:ListItem>
                        <asp:ListItem Value="19">19</asp:ListItem>
                        <asp:ListItem Value="20">20</asp:ListItem>
                        <asp:ListItem Value="21">21</asp:ListItem>
                        <asp:ListItem Value="22">22</asp:ListItem>
                        <asp:ListItem Value="23">23</asp:ListItem>
                        <asp:ListItem Value="24">24</asp:ListItem>
                        <asp:ListItem Value="25">25</asp:ListItem>
                        <asp:ListItem Value="26">26</asp:ListItem>
                        <asp:ListItem Value="27">27</asp:ListItem>
                        <asp:ListItem Value="28">28</asp:ListItem>
                        <asp:ListItem Value="29">29</asp:ListItem>
                        <asp:ListItem Value="30">30</asp:ListItem>
                        <asp:ListItem Value="31">31</asp:ListItem>
                    </asp:DropDownList>
                    <asp:DropDownList ID="ddlMonth2" runat="server">
                        <asp:ListItem Value="01">Jan</asp:ListItem>
                        <asp:ListItem Value="02">Feb</asp:ListItem>
                        <asp:ListItem Value="03">Mar</asp:ListItem>
                        <asp:ListItem Value="04">Apr</asp:ListItem>
                        <asp:ListItem Value="05">May</asp:ListItem>
                        <asp:ListItem Value="06">Jun</asp:ListItem>
                        <asp:ListItem Value="07">Jul</asp:ListItem>
                        <asp:ListItem Value="08">Aug</asp:ListItem>
                        <asp:ListItem Value="09">Sep</asp:ListItem>
                        <asp:ListItem Value="10">Oct</asp:ListItem>
                        <asp:ListItem Value="11">Nov</asp:ListItem>
                        <asp:ListItem Value="12">Dec</asp:ListItem>
                    </asp:DropDownList>
                    <asp:DropDownList ID="ddlYear2" runat="server">
                        <asp:ListItem Value="2010">2010</asp:ListItem>
                        <asp:ListItem Value="2011">2011</asp:ListItem>
                        <asp:ListItem Value="2012">2012</asp:ListItem>
                        <asp:ListItem Value="2013">2013</asp:ListItem>
                    </asp:DropDownList>
                    &nbsp;<b>Renewal</b> :
                    <asp:DropDownList ID="ddlRenewal" runat="server">
                        <asp:ListItem Value="0">No</asp:ListItem>
                        <asp:ListItem Value="1">Yes</asp:ListItem>
                    </asp:DropDownList>
                    <div style="display: none">
                        <asp:TextBox ID="txtReportType" runat="server"></asp:TextBox>
                        <asp:TextBox ID="txtReportDate1" runat="server"></asp:TextBox>
                        <asp:TextBox ID="txtReportDate2" runat="server"></asp:TextBox>
                        <asp:TextBox runat="server" ReadOnly="true" ID="txtAgentId"></asp:TextBox>
                        <asp:Label ID="lblContent" runat="server"></asp:Label>
                    </div>
                    &nbsp;<asp:Button ID="btnSubmit" runat="server" OnClick="btnSubmit_Click" Text="Submit" />&nbsp;
                    <asp:DropDownList ID="ddlLanguage" runat="server" Visible="false">
                        <asp:ListItem Value="1">Thai</asp:ListItem>
                        <asp:ListItem Value="2">English</asp:ListItem>
                    </asp:DropDownList>
                   <%-- &nbsp;
                    <asp:Button ID="btnDownLoad" runat="server" Visible="false" Text="Generate Breakdown Excel Report"
                        OnClick="btnDownLoad_Click" OnClientClick="return SubmitConfirm();" /><br />
                    <asp:Label ID="lblRecordCount" runat="server"></asp:Label>--%>
                </td>
            </tr>
            <tr>
                <td>
                    <asp:Label ID="lblRecordCount" runat="server"></asp:Label>
                    <div style="text-align: right;">
                        <asp:Button ID="btnDownLoad" runat="server" Visible="false" Text="Generate Breakdown Excel Report"
                        OnClick="btnDownLoad_Click" OnClientClick="return SubmitConfirm();" />
                    </div>
                </td>
            </tr>
            <tr>
                <td>
                    <asp:Label ID="lblError" runat="server" ForeColor="Red"></asp:Label>
                    <asp:GridView ID="grvTeleSummary" runat="server" AutoGenerateColumns="False" CellSpacing="3" CellPadding="3" Width="100%" 
                        CssClass="admin_gridstyle" PagerStyle-CssClass="pgr" EmptyDataText="There are no data records to display." GridLines="None" 
                         OnRowDataBound="grvTeleSummary_RowDataBound" OnSelectedIndexChanged="grvTeleSummary_SelectedIndexChanged">
                        <Columns>
                            <asp:BoundField DataField="AgentId" HeaderText="Broker Id" SortExpression="AgentId" />
                            <asp:BoundField DataField="Name" HeaderText="Broker Name" SortExpression="Name" />
                            <asp:BoundField DataField="VMISales" HeaderText="VMI Sales" SortExpression="VMISales" />
                            <asp:BoundField DataField="CollectedPremium" HeaderText="Avg.CollectedPremium" SortExpression="CollectedPremium" />
                            <asp:BoundField DataField="SalesDIVDay" HeaderText="Sales / Day" SortExpression="SalesDIVDay" />
                            <asp:BoundField DataField="TotalCalls" HeaderText="Total Calls" SortExpression="TotalCalls" />
                            <asp:BoundField DataField="CallsDIVDay" HeaderText="Calls / Day" SortExpression="CallsDIVDay" />
                            <asp:BoundField DataField="NewLeads" HeaderText="New Unique Leads" SortExpression="NewLeads" />
                            <asp:BoundField DataField="NewLeadsDIVDay" HeaderText="New Leads / Day" SortExpression="NewLeadsDIVDay" />
                            <asp:BoundField DataField="InvalidNo" HeaderText="Invalid No." SortExpression="InvalidNo" />
                            <asp:BoundField DataField="ContactRate" HeaderText="Contact Rate" SortExpression="ContactRate" />
                            <asp:BoundField DataField="FollowUpCalls" HeaderText="Follow-Up Calls" SortExpression="FollowUpCalls" />
                            <asp:BoundField DataField="ConversionRate" HeaderText="LC %" SortExpression="ConversionRate" />
                        </Columns>
                        <FooterStyle />
                        <PagerStyle />
                        <SelectedRowStyle />
                        <HeaderStyle CssClass="admin_gridheader" />
                        <EditRowStyle />
                        <AlternatingRowStyle CssClass="admin_gridodd" />
                        <RowStyle CssClass="admin_grideven" />
                    </asp:GridView>
                    <%--<div style="float: right; text-align: right; margin-right: 5px;">
                        <div>
                            <asp:Label ID="lblTotalCallFinishCount" Font-Bold="true" Font-Size="15px" runat="server"></asp:Label></div>
                    </div>
                    <div style="float: right; text-align: right; margin-right: 105px;" runat="server"
                        visible="false" id="divTotalCallFinishTitle">
                        <div>
                            <asp:Label ID="lblTotalCallFinishTitle" Font-Bold="true" Font-Size="15px" runat="server" Text="Total Call Finish Count : "></asp:Label></div>
                    </div>
                    <asp:TextBox Visible="false" ID="txtHideTotalCallFinishCount" runat="server">0</asp:TextBox>--%>
                </td>
            </tr>
        </table>
    </div>
    
    <script type="text/javascript">


        function SubmitConfirm() {
            var _retVal = false;
            _retVal = confirm('Are you sure to proceed Generate Breakdown Excel?');
            return _retVal;
        }

    </script>

</asp:Content>
